<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/web/header.jsp"%>
<title>百科</title>
</head>
<body>
<fieldset class="layui-elem-field" style="margin: 20px; padding: 20px;">
        <legend>词条检索</legend>
        <div class="layui-field-box">

            <form class="layui-form layui-form-pane" method="post" onsubmit="return false;">
                <div class="layui-form-item">
                    <label class="layui-form-label">词条：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="item" required lay-verify="required" placeholder="请输入词条"
                            autocomplete="off" class="layui-input">
                    </div>
                        <input type="button" class="layui-btn" value="检索" lay-submit lay-filter="search" /> <input
                            type="reset" class="layui-btn layui-btn-primary" value="重置" onclick="$('#text').html('');"/>
                </div>

            </form>
        </div>
    </fieldset>
    <fieldset class="layui-elem-field" style="margin: 20px; padding: 20px;">
        <legend>词条解释</legend>
        <div class="layui-field-box">
                <div class="layui-form-item">
                    <!--            <label class="layui-form-label"> -->
                    <!--                </label> -->
                    <div class="layui-input-blank">
    <div id='text' style="font-size: 20px"></div>
                    </div>
                </div>
        </div>
    </fieldset>
    <script type="text/javascript">
    formSubmit('/item/item', 'submit(search)', true, function(data) {
    	var text = data.text;
        $("#text").html(text==''?'暂无该词条':text);
    });
    </script>
</body>
</html>